package com.richapp.launcher.control;

import android.content.Context;
import android.util.Log;

/**
 * Created by jack on 2015/3/24 0024.
 */
public class MoveControl {

    private static  MoveControl moveControl;
    private Context context;

    private MoveControl(){

    }

    public static MoveControl getInstance(){
        if(moveControl == null){
            moveControl = new MoveControl();
        }
        return moveControl;
    }

    public Context getContext() {
        return context;
    }

    public void setContext(Context context) {
        this.context = context;
    }

    public void moveUp(){
        //String command = "input keyevent DPAD_UP";
        ControlProcess.getInstance().doCommand(2);
        Log.d("TEST","向上");
    }

    public void moveDown(){
        //String command = "input keyevent DPAD_DOWN";
        ControlProcess.getInstance().doCommand(6);
        Log.d("TEST","向下");
    }

    public void moveLeft(){
        //String command = "input keyevent DPAD_LEFT";
        ControlProcess.getInstance().doCommand(3);
        Log.d("TEST","向左");
    }

    public void moveRight(){
        //String command = "input keyevent DPAD_RIGHT";
        ControlProcess.getInstance().doCommand(4);
        Log.d("TEST","向右");
    }
}
